﻿using DayuCode.Designer.Entity.UI;
using DayuCode.Designer.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DayuCode.Designer.Service.ui
{
    public class FormHandler
    {
        private static string getBaseUrl(string methodName)
        {
            return AppInstance.ApiServer + "api/base/dayucode_formHandler/" + methodName;
        }

		public static HForm getForm(long id)
		{
			HForm obj = QHttpClient.Post<HForm>(getBaseUrl("getForm"), new { id = id });
			return obj;
		}

		public static HForm saveForm(HForm item)
		{
			HForm obj = QHttpClient.Post<HForm>(getBaseUrl("saveForm"), new { item = item });
			return obj;
		}

		public static void deleteForm(long id)
		{
			QHttpClient.Execute(getBaseUrl("deleteForm"), new { id = id });
		}



	}
}
